<!-- INCLUDE overall_header.html -->

<a name="maincontent"></a>

<!-- IF MODE eq 'restore' -->
	<h1>{L_ACP_RESTOREPRO}</h1>

	<p>{L_ACP_RESTOREPRO_EXPLAIN}</p>

	<!-- IF .files -->
	<form id="acp_backup" method="post" action="{U_ACTION}">

	<fieldset>
		<legend>{L_RESTORE_OPTIONS}</legend>
	<dl>
		<dt><label for="file">{L_SELECT_FILE}:</label></dt>
		<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.NAME}"<!-- IF files.S_FIRST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
	</dl>
	<dl>
		<dt><label for="itval"> - {L_OP_INTERVAL}</label><br /><span>{L_OP_INTERVAL_EXPLAIN}</span></dt>
		<dd>
			<input name="itval" type="text" id="itval" value="1" size="2" />
		</dd>
	</dl>

	<p class="submit-buttons">
		<input class="button1" type="submit" id="submit" name="restore" value="{L_START_RESTORE}" onclick="return confirm('{L_CONTINUE_RESTORE}');" />&nbsp;
		<input class="button2" type="submit" id="readme" name="readme" value="{L_SHOW_README}" />&nbsp;
		<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />&nbsp;
		<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
	</p>
	{S_FORM_TOKEN}
	</fieldset>
	</form>
	<!-- ELSE -->
		<div class="errorbox">
			<p>{L_ACP_NO_ITEMS}</p>
		</div>
	<!-- ENDIF -->

<!-- ELSE -->
	<h1>{L_ACP_BACKUPPRO}</h1>

	<p>{L_ACP_BACKUPPRO_EXPLAIN}</p>
	<form id="acp_backup" method="post" action="{U_ACTION}" onsubmit="return check();">
		<fieldset>
			<legend>{L_BACKUP_OPTIONS}</legend>
		<dl>
			<dt><label for="mypath">{L_STORE_PATH}</label><br /><span>{L_STORE_PATH_EXPLAIN}</span></dt>
			<dd>./store/ <input name="mypath" type="text" id="mypath" value="{STORE_PATH}">
			</dd>
		</dl>
		<dl>
			<dt><label for="baktype">{L_BACKUP_TYPE}:</label></dt>
			<dd>
				<label><input type="radio" class="radio" name="baktype" value="0" id="baktype" checked /> {L_BACKUP_BY_SIZE}</label>
				<label><input type="radio" class="radio" name="baktype" value="1" id="baktype" /> {L_BACKUP_BY_VOLUME}</label>
			</dd>
		</dl>
		<dl>
			<dt><label for="filesize"> - {L_FILE_SIZE}</label></dt>
			<dd>
				<input name="filesize" type="text" id="filesize" value="300" size="6" /> KB (1 MB = 1024 KB)
			</dd>
		</dl>
		<dl>
			<dt><label for="bakline"> - {L_VOLUME_SIZE}</label><br /><span>{L_VOLUME_SIZE_EXPLAIN}</span></dt>
			<dd>
				<input name="bakline" type="text" id="bakline" value="500" size="6" /> <input name="autoauf" type="checkbox" id="autoauf" value="1" checked> {L_AUTOINCREASEMENT}
			</dd>
		</dl>
		<dl>
			<dt><label for="waitbaktime"> - {L_OP_INTERVAL}</label><br /><span>{L_OP_INTERVAL_EXPLAIN}</span></dt>
			<dd>
				<input name="waitbaktime" type="text" id="waitbaktime" value="1" size="2" />
			</dd>
		</dl>
		<dl>
			<dt><label for="bakstru">{L_INCLUDE_STRUCTURE}:</label></dt>
			<dd><label><input name="bakstru" type="checkbox" id="bakstru" value="1" checked /> {L_INCLUDE_STRUCTURE_EXPLAIN}</label></dd>
		</dl>
		<dl>
			<dt><label for="dbchar">{L_DB_CHARSET}</label></dt>
			<dd><label>
				<select name="dbchar" id="dbchar">
					<option value="utf8">utf8</option>
	                <option value="auto">Auto</option>
	                <option value="gbk">gbk</option>
	                <option value="gb2312">gb2312</option>
	                <option value="big5">big5</option>
	                <option value="latin1">latin1</option>
	                <option value="">NULL</option>
				</select>
				{L_DB_CHARSET_EXPLAIN}</label>
			</dd>
		</dl>
		<dl>
			<dt><label for="insertf">{L_INSERT_CMD}</label></dt>
			<dd>
				<select name="insertf" id="insertf">
					<option value="insert">INSERT</option>
					<option value="replace">REPLACE</option>
				</select>
			</dd>
		</dl>
		
		<dl>
			<dt><label for="beover">{L_FULL_INSERT}</label></dt>
			<dd><label><input name="beover" type="checkbox" id="beover" value="1"  checked /> {L_FULL_INSERT_EXPLAIN}</label></dd>
		</dl>
		<dl>
			<dt><label for="bakstrufour">{L_MYSQL4_COMPAT}</label></dt>
			<dd><label><input name="bakstrufour" type="checkbox" id="bakstrufour" value="1" /> {L_MYSQL4_COMPAT_EXPLAIN}</label></dd>
		</dl>
		<dl>
			<dt><label for="readme">{L_BACKUP_README}</label><br /><span>{L_BACKUP_README_EXPLAIN}</span></dt>
			<dd><textarea name="readme" cols="80" rows="8" id="readme"></textarea></dd>
		</dl>
		<dl>
			<dt><label for="autofield">{L_NO_AUTOINC_TABS}:</label><br /><span>{L_NO_AUTOINC_TABS_EXPLAIN}</span></dt>
			<dd><textarea name="autofield" cols="80" rows="5" id="autofield"></textarea></dd>
		</dl>
		

	</fieldset>
	<fieldset>
		<legend>{L_TABLE_SELECT}</legend>
		<table cellspacing="1">
			<thead>
			<tr>
				<th></th>
				<th>{L_TABLE}</th>
			</tr>
			</thead>
			<tbody>
			<!-- BEGIN tables -->
				<!-- IF tables.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
					<td style="text-align: center; width:12px;"><input name="table_name[]" type="checkbox" id="table_name[]" value="{tables.TABLE}"></td>
					<td>{tables.TABLE}</td>
				</tr>
			<!-- BEGINELSE -->
				<tr>
					<td class="row1" colspan="2" style="text-align: center;">{L_NO_TABLES}</td>
				</tr>
			<!-- END tables -->
				<tr>
					<td style="text-align: center;"><input name="check_all" type="checkbox" id="check_all" value="" onclick="CheckAll(this.form)"></td>
					<td>{L_SELECT_ALL}/{L_DESELECT_ALL}</td>
				</tr>
		</table>
		<p class="submit-buttons">
			<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
			<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
		</p>
		{S_FORM_TOKEN}
		</fieldset>
	</form>
	
	<script language="JavaScript">
	function CheckAll(form) {
		for (var i=0;i<form.elements.length;i++) {
		    var e = form.elements[i];
			if (e.name == 'table_name[]') e.checked = form.check_all.checked;
		}
	}
	function reverseCheckAll(form) {
		for (var i=0;i<form.elements.length;i++) {
			var e = form.elements[i];
			if (e.name != 'check_all') {
				if(e.checked==true) {
					e.checked = false;
				} else {
					e.checked = true;
				}
			}
		}
	}
	function SelectCheckAll(form) {
		for (var i=0;i<form.elements.length;i++) {
			var e = form.elements[i];
			if (e.name == 'table_name') e.checked = true;
		}
	}
	function check() {
		return confirm("{L_CONTINUE_BACKUP}");
	}

	</script>


<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->
